package com.secxiot.provider.communication.entity;

import java.util.ArrayList;
import java.util.List;

public class CommunicationAttachmentExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    protected Integer pageNo = 1;

    protected Integer startRow;

    protected Integer pageSize = 10;

    protected String fields;

    public CommunicationAttachmentExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo=pageNo;
        this.startRow = (pageNo-1)*this.pageSize;
    }

    public Integer getPageNo() {
        return pageNo;
    }

    public void setStartRow(Integer startRow) {
        this.startRow=startRow;
    }

    public Integer getStartRow() {
        return startRow;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize=pageSize;
        this.startRow = (pageNo-1)*this.pageSize;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setFields(String fields) {
        this.fields=fields;
    }

    public String getFields() {
        return fields;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andCommunicationIdIsNull() {
            addCriterion("communication_id is null");
            return (Criteria) this;
        }

        public Criteria andCommunicationIdIsNotNull() {
            addCriterion("communication_id is not null");
            return (Criteria) this;
        }

        public Criteria andCommunicationIdEqualTo(Long value) {
            addCriterion("communication_id =", value, "communicationId");
            return (Criteria) this;
        }

        public Criteria andCommunicationIdNotEqualTo(Long value) {
            addCriterion("communication_id <>", value, "communicationId");
            return (Criteria) this;
        }

        public Criteria andCommunicationIdGreaterThan(Long value) {
            addCriterion("communication_id >", value, "communicationId");
            return (Criteria) this;
        }

        public Criteria andCommunicationIdGreaterThanOrEqualTo(Long value) {
            addCriterion("communication_id >=", value, "communicationId");
            return (Criteria) this;
        }

        public Criteria andCommunicationIdLessThan(Long value) {
            addCriterion("communication_id <", value, "communicationId");
            return (Criteria) this;
        }

        public Criteria andCommunicationIdLessThanOrEqualTo(Long value) {
            addCriterion("communication_id <=", value, "communicationId");
            return (Criteria) this;
        }

        public Criteria andCommunicationIdIn(List<Long> values) {
            addCriterion("communication_id in", values, "communicationId");
            return (Criteria) this;
        }

        public Criteria andCommunicationIdNotIn(List<Long> values) {
            addCriterion("communication_id not in", values, "communicationId");
            return (Criteria) this;
        }

        public Criteria andCommunicationIdBetween(Long value1, Long value2) {
            addCriterion("communication_id between", value1, value2, "communicationId");
            return (Criteria) this;
        }

        public Criteria andCommunicationIdNotBetween(Long value1, Long value2) {
            addCriterion("communication_id not between", value1, value2, "communicationId");
            return (Criteria) this;
        }

        public Criteria andFileTypeIsNull() {
            addCriterion("file_type is null");
            return (Criteria) this;
        }

        public Criteria andFileTypeIsNotNull() {
            addCriterion("file_type is not null");
            return (Criteria) this;
        }

        public Criteria andFileTypeEqualTo(String value) {
            addCriterion("file_type =", value, "fileType");
            return (Criteria) this;
        }

        public Criteria andFileTypeNotEqualTo(String value) {
            addCriterion("file_type <>", value, "fileType");
            return (Criteria) this;
        }

        public Criteria andFileTypeGreaterThan(String value) {
            addCriterion("file_type >", value, "fileType");
            return (Criteria) this;
        }

        public Criteria andFileTypeGreaterThanOrEqualTo(String value) {
            addCriterion("file_type >=", value, "fileType");
            return (Criteria) this;
        }

        public Criteria andFileTypeLessThan(String value) {
            addCriterion("file_type <", value, "fileType");
            return (Criteria) this;
        }

        public Criteria andFileTypeLessThanOrEqualTo(String value) {
            addCriterion("file_type <=", value, "fileType");
            return (Criteria) this;
        }

        public Criteria andFileTypeLike(String value) {
            addCriterion("file_type like", value, "fileType");
            return (Criteria) this;
        }

        public Criteria andFileTypeNotLike(String value) {
            addCriterion("file_type not like", value, "fileType");
            return (Criteria) this;
        }

        public Criteria andFileTypeIn(List<String> values) {
            addCriterion("file_type in", values, "fileType");
            return (Criteria) this;
        }

        public Criteria andFileTypeNotIn(List<String> values) {
            addCriterion("file_type not in", values, "fileType");
            return (Criteria) this;
        }

        public Criteria andFileTypeBetween(String value1, String value2) {
            addCriterion("file_type between", value1, value2, "fileType");
            return (Criteria) this;
        }

        public Criteria andFileTypeNotBetween(String value1, String value2) {
            addCriterion("file_type not between", value1, value2, "fileType");
            return (Criteria) this;
        }

        public Criteria andFileLogIdIsNull() {
            addCriterion("file_log_id is null");
            return (Criteria) this;
        }

        public Criteria andFileLogIdIsNotNull() {
            addCriterion("file_log_id is not null");
            return (Criteria) this;
        }

        public Criteria andFileLogIdEqualTo(Long value) {
            addCriterion("file_log_id =", value, "fileLogId");
            return (Criteria) this;
        }

        public Criteria andFileLogIdNotEqualTo(Long value) {
            addCriterion("file_log_id <>", value, "fileLogId");
            return (Criteria) this;
        }

        public Criteria andFileLogIdGreaterThan(Long value) {
            addCriterion("file_log_id >", value, "fileLogId");
            return (Criteria) this;
        }

        public Criteria andFileLogIdGreaterThanOrEqualTo(Long value) {
            addCriterion("file_log_id >=", value, "fileLogId");
            return (Criteria) this;
        }

        public Criteria andFileLogIdLessThan(Long value) {
            addCriterion("file_log_id <", value, "fileLogId");
            return (Criteria) this;
        }

        public Criteria andFileLogIdLessThanOrEqualTo(Long value) {
            addCriterion("file_log_id <=", value, "fileLogId");
            return (Criteria) this;
        }

        public Criteria andFileLogIdIn(List<Long> values) {
            addCriterion("file_log_id in", values, "fileLogId");
            return (Criteria) this;
        }

        public Criteria andFileLogIdNotIn(List<Long> values) {
            addCriterion("file_log_id not in", values, "fileLogId");
            return (Criteria) this;
        }

        public Criteria andFileLogIdBetween(Long value1, Long value2) {
            addCriterion("file_log_id between", value1, value2, "fileLogId");
            return (Criteria) this;
        }

        public Criteria andFileLogIdNotBetween(Long value1, Long value2) {
            addCriterion("file_log_id not between", value1, value2, "fileLogId");
            return (Criteria) this;
        }

        public Criteria andFileUriIsNull() {
            addCriterion("file_uri is null");
            return (Criteria) this;
        }

        public Criteria andFileUriIsNotNull() {
            addCriterion("file_uri is not null");
            return (Criteria) this;
        }

        public Criteria andFileUriEqualTo(String value) {
            addCriterion("file_uri =", value, "fileUri");
            return (Criteria) this;
        }

        public Criteria andFileUriNotEqualTo(String value) {
            addCriterion("file_uri <>", value, "fileUri");
            return (Criteria) this;
        }

        public Criteria andFileUriGreaterThan(String value) {
            addCriterion("file_uri >", value, "fileUri");
            return (Criteria) this;
        }

        public Criteria andFileUriGreaterThanOrEqualTo(String value) {
            addCriterion("file_uri >=", value, "fileUri");
            return (Criteria) this;
        }

        public Criteria andFileUriLessThan(String value) {
            addCriterion("file_uri <", value, "fileUri");
            return (Criteria) this;
        }

        public Criteria andFileUriLessThanOrEqualTo(String value) {
            addCriterion("file_uri <=", value, "fileUri");
            return (Criteria) this;
        }

        public Criteria andFileUriLike(String value) {
            addCriterion("file_uri like", value, "fileUri");
            return (Criteria) this;
        }

        public Criteria andFileUriNotLike(String value) {
            addCriterion("file_uri not like", value, "fileUri");
            return (Criteria) this;
        }

        public Criteria andFileUriIn(List<String> values) {
            addCriterion("file_uri in", values, "fileUri");
            return (Criteria) this;
        }

        public Criteria andFileUriNotIn(List<String> values) {
            addCriterion("file_uri not in", values, "fileUri");
            return (Criteria) this;
        }

        public Criteria andFileUriBetween(String value1, String value2) {
            addCriterion("file_uri between", value1, value2, "fileUri");
            return (Criteria) this;
        }

        public Criteria andFileUriNotBetween(String value1, String value2) {
            addCriterion("file_uri not between", value1, value2, "fileUri");
            return (Criteria) this;
        }

        public Criteria andDelFlagIsNull() {
            addCriterion("del_flag is null");
            return (Criteria) this;
        }

        public Criteria andDelFlagIsNotNull() {
            addCriterion("del_flag is not null");
            return (Criteria) this;
        }

        public Criteria andDelFlagEqualTo(Integer value) {
            addCriterion("del_flag =", value, "delFlag");
            return (Criteria) this;
        }

        public Criteria andDelFlagNotEqualTo(Integer value) {
            addCriterion("del_flag <>", value, "delFlag");
            return (Criteria) this;
        }

        public Criteria andDelFlagGreaterThan(Integer value) {
            addCriterion("del_flag >", value, "delFlag");
            return (Criteria) this;
        }

        public Criteria andDelFlagGreaterThanOrEqualTo(Integer value) {
            addCriterion("del_flag >=", value, "delFlag");
            return (Criteria) this;
        }

        public Criteria andDelFlagLessThan(Integer value) {
            addCriterion("del_flag <", value, "delFlag");
            return (Criteria) this;
        }

        public Criteria andDelFlagLessThanOrEqualTo(Integer value) {
            addCriterion("del_flag <=", value, "delFlag");
            return (Criteria) this;
        }

        public Criteria andDelFlagIn(List<Integer> values) {
            addCriterion("del_flag in", values, "delFlag");
            return (Criteria) this;
        }

        public Criteria andDelFlagNotIn(List<Integer> values) {
            addCriterion("del_flag not in", values, "delFlag");
            return (Criteria) this;
        }

        public Criteria andDelFlagBetween(Integer value1, Integer value2) {
            addCriterion("del_flag between", value1, value2, "delFlag");
            return (Criteria) this;
        }

        public Criteria andDelFlagNotBetween(Integer value1, Integer value2) {
            addCriterion("del_flag not between", value1, value2, "delFlag");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}